{% extends "../base.html" %}

{% block title %}{{title}}{% endblock %}

{% block content %}


<br />
<h1>{{title}}</h1>
<hr class="top" />
</div>

<form action="/post/new" method="post" enctype="multipart/form-data" onsubmit="return c();" id="postform_main">
<div id="postform">

[<span id="show" class="hide" onmouseover="showform();" onclick="showform();">投稿</span><span id="hide" class="show" onmouseover="hideform();" onclick="hideform();">隱藏表單</span>]

<div style="text-align: center;">
<table cellpadding="1" cellspacing="1" id="postform_tbl" style="margin: 0px auto; text-align: left;">
<tr><td class="Form_bg"><b>名 稱</b></td><td><input type="text" name="name" id="fname" size="28" value="" /></td></tr>
<tr><td class="Form_bg"><b>E-mail</b></td><td><input type="text" name="email" id="femail" size="28" value="" /></td></tr>
<tr><td class="Form_bg"><b>標 題</b></td><td><input type="text" name="sub" id="fsub" size="28" value="" /><input type="submit" name="sendbtn" value="送 出" /></td></tr>
<tr><td class="Form_bg"><b>內 文</b></td><td><textarea name="com" id="fcom" cols="48" rows="4" style="width: 400px; height: 80px;"></textarea></td></tr>
<tr><td class="Form_bg"><b>附加圖檔</b></td><td><input type="file" name="upfile" id="fupfile" size="25" /><input class="hide" type="checkbox" name="reply" value="yes" />[<input type="checkbox" name="noimg" id="noimg" value="on" /><label for="noimg">無貼圖</label>]
[<input type="checkbox" name="up_series" id="up_series" value="on" /><label for="up_series">連貼機能</label>]

</td></tr>
<tr><td class="Form_bg"><b>類別標籤</b></td><td><input type="text" name="category" size="28" value="" /><small>(請以 , 逗號分隔多個標籤)</small></td></tr>
<tr><td class="Form_bg"><b>刪除用密碼</b></td><td><input type="password" name="pwd" size="8" maxlength="8" value="{{savepassword}}" /><small>(刪除文章用。英數字8字元以內)</small></td></tr>

<tr><td colspan="2">
<div id="postinfo">
<ul><li>此服務可以接受 JPEG、PNG、GIF (包括動畫 GIF)、BMP、TIFF 以及 ICO 格式的影像資料</li><li>附加圖檔最大上傳資料量為 1 MB。當回文時E-mail填入sage為不推文功能</li><li>當檔案超過寬 250 像素、高 250 像素時會自動縮小尺寸顯示</li>
<li>目前附加圖檔使用量大小： 75 KB / 30000 KB</li>

</ul>
<noscript><div>＊您選擇關閉了JavaScript，但這對您的瀏覽及發文應無巨大影響</div></noscript>
</div>
</td></tr>
</table>
</div>
<script type="text/javascript">l1();</script>
<hr />
</div>
</form>
<script type="text/javascript">hideform();</script>

<div id="contents">

<form action="/post/delete" method="post">
<div id="threads" class="autopagerize_page_element">

{% if msgs %}
{% for msg in msgs %}
<div class="threadpost" id="r{{msg.index}}">
{% if msg.pic %}
檔名：<a href="/image/get/{{msg.key}}" rel="_blank">無</a>-({{msg.size}} KB, {{msg.width}}x{{msg.height}}) {%if msg.resize %}<small>[以預覽圖顯示]</small>{% endif %}<br /><a href="/image/get/{{msg.key}}" style="width: {{msg.newwidth}}px; height: {{msg.newheight}}px;" class="img" alt="" title="" /><img src="/image/resize/{{msg.key}}"></a>
{% endif %}
<input type="checkbox" name="{{msg.key}}" value="delete" /><span class="title">{{msg.title}}</span>
名稱: <span class="name">{% if msg.email %}<a href="mailto:msg.email">{% endif %}{{msg.username}}{% if msg.email %}</a>{% endif %}</span> [{{msg.createtime}} ID:{{msg.postid}}] <a href="/post/read/{{msg.key}}" class="qlink">No.{{msg.index}}</a>&nbsp;[<a href="/post/read/{{msg.key}}">回應</a>]
<div class="quote">{{msg.content|escape}}</div>

</div>
{% if msg.replies %}
{% for reply in msg.replies %}
<div class="reply" id="r{{reply.index}}">
<input type="checkbox" name="{{reply.key}}" value="delete" /><span class="title">{{reply.title}}</span> 名稱: <span class="name">{{reply.username}}</span> [{{reply.createtime}} ID:{{reply.postid}}] <a href="/post/read/{{msg.key}}" class="qlink">No.{{reply.index}}</a> &nbsp; 
{% if reply.pic %}
<br>檔名：<a href="/image/get/{{reply.key}}" rel="_blank">無</a>-({{reply.size}} KB, {{reply.width}}x{{reply.height}}) {%if reply.resize %}<small>[以預覽圖顯示]</small>{% endif %}<br /><a href="/image/get/{{reply.key}}" style="width: {{reply.newwidth}}px; height: {{reply.newheight}}px;" class="img" alt="" title="" /><img src="/image/resizeReply/{{reply.key}}"></a>
{% endif %}
<div class="quote">{{reply.content|escape}}</div>

</div>
{% endfor %}
{% endif %}
<hr />
{% endfor %}
{% endif %}
</div>


<div id="del">
<table style="float: right;">
<tr><td align="center" style="white-space: nowrap;">
<input type="hidden" name="mode" value="usrdel" />【刪除文章】[<input type="checkbox" name="onlyimgdel" id="onlyimgdel" value="on" /><label for="onlyimgdel">僅刪除附加圖檔</label>]<br />
刪除用密碼: <input type="password" name="pwd" size="8" value="{{savepassword}}" /><input type="submit" value=" 執行 " />

</td></tr>
</table>
</div>

<script type="text/javascript">l2();</script>
</form>
<div id="page_switch"><table border="1"><tr>{% ifequal 0 nowpage %}<td style="white-space: nowrap;">第一頁</td>{% else %}<td><form action="/" method="get"><input value="{{nowpage|add:"-1"}}" type="hidden" name="pages" ><div><input value="上一頁" type="submit"></div></form></td>{% endifequal %}<td>{% for page in pages %}{% ifequal page nowpage %}[<b>{{page}}</b>]{% else %}[<a href="/?pages={{page}}">{{page}}</a>]{% endifequal %}{% endfor %}</td>{% ifequal maxpage nowpage %}<td style="white-space: nowrap;">最後一頁</td>{%else%}<td><form action="/" method="get"><input value="{{nowpage|add:"1"}}" type="hidden" name="pages" ><div><input value="下一頁" type="submit"></div></form></td>{% endifequal %}</tr></table>
<br style="clear: left;" />
</div>
</div>

<div id="footer">
{% include "../footer.html" %}
</div>

{% endblock %}